package xuhaijia.lanou3g.autohome.recommend.talker;
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//                  \./                   \\`.
//        .'//            为什么坚持  想一想当初             \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-.  \\`.
//    .'//.-"                 `-.  |  .-'                 "-. \\`.
//  .'//______.============-..   \ | /   ..-============._______\\`.
//.'//____________________________\|/_____________________________\\`.
// 
//                             

import android.widget.ListView;

import xuhaijia.lanou3g.autohome.R;
import xuhaijia.lanou3g.autohome.base.BaseFragment;
import xuhaijia.lanou3g.autohome.base.NetTool;
import xuhaijia.lanou3g.autohome.base.URLValues;

/**
 * Created by dllo on 16/8/15.
 */
public class TalkerFragment extends BaseFragment {

    private ListView ll;

    @Override
    protected int setLayout() {
        return R.layout.fragment_listview;
    }

    @Override
    protected void initView() {
        ll = bindView(R.id.lv);
    }

    @Override
    protected void initData() {
        final TalkerAdapter adapter = new TalkerAdapter(mContext);
        mNetTool.getNetData(URLValues.LOBBYISTS_URL, TalkerBean.class, new NetTool.NetListener<TalkerBean>() {
            @Override
            public void onSuccess(TalkerBean talkerBean) {
                adapter.setTalkerBean(talkerBean);
                ll.setAdapter(adapter);
            }

            @Override
            public void onError(String errorMsg) {

            }
        });
    }

    @Override
    public void load() {

    }

    @Override
    public void refresh() {

    }
}
